﻿Ext.define('Sofia.controller.Plot',
{
    extend: 'Ext.app.Controller',
    views: ['Sidebar', 'tab.Plot'],

    refs:
    [{
        selector: '.sidebar',
        ref: 'sideBar'
    }],

    init: function () {
        this.control(
        {
            '#HeaderPanel #PlotButton':
            {
                click: this.onPlotClick
            }
        });
    },

    onPlotClick: function () {
        var sideBar = this.getSideBar();
        sideBar.setActiveTab(3); //Plot tab
    }
});